Component({
    properties: {
        cates:{type:Array, value:[]},
        selectIndex:{
            type:String, value:0,
            observer(data){
                this.setData({
                    _selectIndex:data,
                })
            }
        },
    },
    data: {
        _selectIndex:0
    },
    methods: {
        cateSelect(e){
            const {index} = e.currentTarget.dataset
            const {cates} = this.data
            const selectCate = cates[index]

            this.setData({
                _selectIndex:index
            })

            this.triggerEvent("change", {
                index
            })
        }
    },
});
